﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeImageList.ascx.cs" Inherits="SocialFront.Web.usercontrols.Gallery.HomeImageList" %>

<h2>Recent Images</h2>

<section class="thumb_grid fullpanel">
<asp:ListView ID="imageList" runat="server">
    <LayoutTemplate>
        <ul><asp:PlaceHolder ID="itemPlaceholder" runat="server" /></ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li>
            <a href="<%# ((SocialFront.Entities.Image)Container.DataItem).PageUrl %>">
                <img src="/extensions/ImageScale.ashx?ImgFile=<%# ((SocialFront.Entities.Image)Container.DataItem).Media.FilePath %>&amp;width=100&amp;height=100&amp;constrain=1" />
            </a>
            <br />
            <a href="<%# ((SocialFront.Entities.Image)Container.DataItem).PageUrl %>"><%# ((SocialFront.Entities.Image)Container.DataItem).Title %></a>
            <br />
            <%# ((SocialFront.Entities.Image)Container.DataItem).CreatedDate.ToString("dd MMM yyyy") %>
        </li>
    </ItemTemplate>
    <EmptyDataTemplate><p>No Images have been added yet!</p></EmptyDataTemplate>
</asp:ListView>
</section>